var href = location.href
var ifsuc = href.substr(href.lastIndexOf('?') + 1)
if (ifsuc === 'loginsuc=false') {
  alert('登录失败')
}else if (ifsuc === 'registersuc=true') {
  alert('注册成功')
}else if (ifsuc === 'loginsuc=true') {
  alert('登录成功')
}